package yunquan.wang.base.web;

import java.util.Collection;

import org.springframework.data.domain.Pageable;

import yunquan.wang.base.dao.PropertyFilter;

public class PageSearch {
	private Pageable page;
	private Collection<PropertyFilter> filters;
	public Pageable getPage() {
		return page;
	}
	public void setPage(Pageable page) {
		this.page = page;
	}
	public Collection<PropertyFilter> getFilters() {
		return filters;
	}
	public void setFilters(Collection<PropertyFilter> filters) {
		this.filters = filters;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((filters == null) ? 0 : filters.hashCode());
		result = prime * result + ((page == null) ? 0 : page.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PageSearch other = (PageSearch) obj;
		if (filters == null) {
			if (other.filters != null)
				return false;
		} else if (!filters.equals(other.filters))
			return false;
		if (page == null) {
			if (other.page != null)
				return false;
		} else if (!page.equals(other.page))
			return false;
		return true;
	}
	

}
